import Vue from 'vue'
import Router from 'vue-router'
import index from '@/page/index'/*首页*/
import hotel from '@/page/hotel'/*酒店*/
import gerenZhengXin from '@/page/gerenZhengXin'/*个人征信*/
import lianlu from '@/page/lianlu'/*链路*/
import chexian from '@/page/chexian'/*链路*/
import allDetail from '@/page/hotel/allDetail'
import customAyanc from '@/page/hotel/customAyanc'
import hotArea from '@/page/hotel/hotArea'
import stateAyanc from '@/page/hotel/stateAyanc'
import pinggu from '@/page/gerenzhengxin/pinggu'
import zhinengchexian from '@/page/chexian/zhinengchexian'


Vue.use(Router)

export default new Router({ 
    routes: [
        {
            path: '/',
            name: 'index',
            component: index
        },
        {/*酒店大数据*/
            path: '/hotel',
            name: 'hotel',
            component: hotel,
            meta:[
                {
                    name:'首页',
                    val:'index',
                },
                {
                    name:'城市酒店',
                    val:'allDetail',
                },
                {
                    name:'住宿热力图',
                    val:'hotArea',
                },
                {
                    name:'住客情况分析',
                    val:'customAyanc',
                },
            ],
            redirect: '/hotel/allDetail',
            children: [
                {
                    path: '/hotel/allDetail',
                    name: 'allDetail',
                    component: allDetail
                },
                {
                    path: '/hotel/customAyanc',
                    name: 'customAyanc',
                    component: customAyanc
                },
                {
                    path: '/hotel/hotArea',
                    name: 'hotArea',
                    component: hotArea
                },
            ]
        },
        {/*个人征信大数据*/
            path: '/gerenZhengXin',
            name: 'gerenZhengXin',
            component: gerenZhengXin,
            meta:[
                {
                    name:'首页',
                    val:'index',
                },
                {
                    name:'征信数据与服务人数',
                    val:'pinggu',
                },
            ],
            redirect: '/gerenZhengXin/pinggu',
            children: [
                {
                    path: '/gerenZhengXin/pinggu',
                    name: 'pinggu',
                    component: pinggu
                },
            ]
        },
        {/*链路*/
            path: '/lianlu',
            name: 'lianlu',
            component: lianlu,
            meta:[
                {
                    name:'首页',
                    val:'index',
                },
            ],
        },
        {/*车险*/
            path: '/chexian',
            name: 'chexian',
            component: chexian,
            meta:[
                {
                    name:'首页',
                    val:'index',
                },
                {
                    name:'智能车险后台',
                    val:'zhinengchexian',
                },
            ],
            redirect: '/chexian/zhinengchexian',
            children: [
                {
                    path: '/chexian/zhinengchexian',
                    name: 'zhinengchexian',
                    component: zhinengchexian
                },
            ]
        },
    ]
})
